<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>shark::QpMcLinearADM&lt; InputT &gt; Class Template Reference</title>
<script type="text/javaScript" src="search/search.js"></script>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3.0.1/es5/tex-mml-chtml.js"></script>
<script src="../../mlstyle.js"></script>
<link href="../css/besser.css" rel="stylesheet" type="text/css"/>
</head>
<!-- pretty cool: each body gets an id tag which is the basename of the web page  -->
<!--              and allows for page-specific CSS. this is client-side scripted, -->
<!--              so the id will not yet show up in the served source code -->
<script type="text/javascript">
    jQuery(document).ready(function () {
        var url = jQuery(location).attr('href');
        var pname = url.substr(url.lastIndexOf("/")+1, url.lastIndexOf(".")-url.lastIndexOf("/")-1);
        jQuery('#this_url').html('<strong>' + pname + '</strong>');
        jQuery('body').attr('id', pname);
    });
</script>
<body>
    <div id="shark_old">
        <div id="wrap">
            <div id="header">
                <div id="site-name"><a href="../../sphinx_pages/build/html/index.html">Shark machine learning library</a></div>
                <ul id="nav">
                    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/installation.html">Installation</a>
                    </li>
		    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/tutorials/tutorials.html">Tutorials</a>
                    </li>
		    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/benchmark.html">Benchmarks</a>
                    </li>
                    <li class="active">
                        <a href="classes.html">Documentation</a>
                        <ul>
                            <li class="first"></li>
                            <li><a href="../../sphinx_pages/build/html/rest_sources/quickref/quickref.html">Quick references</a></li>
                            <li><a href="classes.html">Class list</a></li>
                            <li class="last"><a href="group__shark__globals.html">Global functions</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div>
    </div>
<div id="doxywrapper">
<!--
    <div id="global_doxytitle">Doxygen<br>Documentation:</div>
-->
    <div id="navrow_wrapper">
<!-- Generated by Doxygen 1.9.8 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceshark.html">shark</a></li><li class="navelem"><a class="el" href="classshark_1_1_qp_mc_linear_a_d_m.html">QpMcLinearADM</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="classshark_1_1_qp_mc_linear_a_d_m-members.html">List of all members</a> &#124;
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a>  </div>
  <div class="headertitle"><div class="title">shark::QpMcLinearADM&lt; InputT &gt; Class Template Reference</div></div>
</div><!--header-->
<div class="contents">

<p>Solver for the multi-class SVM with absolute margin and discriminative maximum loss.  
 <a href="classshark_1_1_qp_mc_linear_a_d_m.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_qp_mc_linear_8h_source.html">shark/Algorithms/QP/QpMcLinear.h</a>&gt;</code></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for shark::QpMcLinearADM&lt; InputT &gt;:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><img src="classshark_1_1_qp_mc_linear_a_d_m__inherit__graph.png" border="0" usemap="#ashark_1_1_qp_mc_linear_a_d_m_3_01_input_t_01_4_inherit__map" alt="Inheritance graph"/></div>
<map name="ashark_1_1_qp_mc_linear_a_d_m_3_01_input_t_01_4_inherit__map" id="ashark_1_1_qp_mc_linear_a_d_m_3_01_input_t_01_4_inherit__map">
<area shape="rect" title="Solver for the multi&#45;class SVM with absolute margin and discriminative maximum loss." alt="" coords="5,94,167,135"/>
<area shape="rect" href="classshark_1_1_qp_mc_linear.html" title="Generic solver skeleton for linear multi&#45;class SVM problems." alt="" coords="16,5,156,46"/>
<area shape="poly" title=" " alt="" coords="89,62,89,94,83,94,83,62"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-types" name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a4d8bc5efdd4db624d7c22a167637e53c" id="r_a4d8bc5efdd4db624d7c22a167637e53c"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classshark_1_1_labeled_data.html">LabeledData</a>&lt; InputT, unsigned int &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_qp_mc_linear_a_d_m.html#a4d8bc5efdd4db624d7c22a167637e53c">DatasetType</a></td></tr>
<tr class="separator:a4d8bc5efdd4db624d7c22a167637e53c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_types_classshark_1_1_qp_mc_linear"><td colspan="2" onclick="javascript:toggleInherit('pub_types_classshark_1_1_qp_mc_linear')"><img src="closed.png" alt="-"/>&#160;Public Types inherited from <a class="el" href="classshark_1_1_qp_mc_linear.html">shark::QpMcLinear&lt; InputT &gt;</a></td></tr>
<tr class="memitem:a844cac01d9113019e1f89de7d0810d79 inherit pub_types_classshark_1_1_qp_mc_linear" id="r_a844cac01d9113019e1f89de7d0810d79"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_qp_mc_linear.html#a844cac01d9113019e1f89de7d0810d79">CoordinateSelectionStrategy</a> { <a class="el" href="classshark_1_1_qp_mc_linear.html#a844cac01d9113019e1f89de7d0810d79ac281d0b5f356d094aa5ad039e28cdc35">UNIFORM</a>
, <a class="el" href="classshark_1_1_qp_mc_linear.html#a844cac01d9113019e1f89de7d0810d79a306e16139b81caaa99ea79d3ede9a712">ACF</a>
 }</td></tr>
<tr class="separator:a844cac01d9113019e1f89de7d0810d79 inherit pub_types_classshark_1_1_qp_mc_linear"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a09a8a598fe1e6c6c625be0c55b03985a inherit pub_types_classshark_1_1_qp_mc_linear" id="r_a09a8a598fe1e6c6c625be0c55b03985a"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classshark_1_1_labeled_data.html">LabeledData</a>&lt; InputT, unsigned int &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_qp_mc_linear.html#a09a8a598fe1e6c6c625be0c55b03985a">DatasetType</a></td></tr>
<tr class="separator:a09a8a598fe1e6c6c625be0c55b03985a inherit pub_types_classshark_1_1_qp_mc_linear"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8da0d0f5ee8a849b350304e391ae0ea1 inherit pub_types_classshark_1_1_qp_mc_linear" id="r_a8da0d0f5ee8a849b350304e391ae0ea1"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classshark_1_1_labeled_data.html">LabeledData</a>&lt; InputT, unsignedint &gt;::const_element_reference&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_qp_mc_linear.html#a8da0d0f5ee8a849b350304e391ae0ea1">ElementType</a></td></tr>
<tr class="separator:a8da0d0f5ee8a849b350304e391ae0ea1 inherit pub_types_classshark_1_1_qp_mc_linear"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a88e09c2e6decd1e35f0755f0faf982f7 inherit pub_types_classshark_1_1_qp_mc_linear" id="r_a88e09c2e6decd1e35f0755f0faf982f7"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="structshark_1_1_batch.html">Batch</a>&lt; InputT &gt;::const_reference&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_qp_mc_linear.html#a88e09c2e6decd1e35f0755f0faf982f7">InputReferenceType</a></td></tr>
<tr class="separator:a88e09c2e6decd1e35f0755f0faf982f7 inherit pub_types_classshark_1_1_qp_mc_linear"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a6066f28f061d4bef949314816c67a82c" id="r_a6066f28f061d4bef949314816c67a82c"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_qp_mc_linear_a_d_m.html#a6066f28f061d4bef949314816c67a82c">QpMcLinearADM</a> (const <a class="el" href="classshark_1_1_qp_mc_linear_a_d_m.html#a4d8bc5efdd4db624d7c22a167637e53c">DatasetType</a> &amp;dataset, std::size_t dim, std::size_t classes)</td></tr>
<tr class="memdesc:a6066f28f061d4bef949314816c67a82c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor.  <br /></td></tr>
<tr class="separator:a6066f28f061d4bef949314816c67a82c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classshark_1_1_qp_mc_linear"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classshark_1_1_qp_mc_linear')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classshark_1_1_qp_mc_linear.html">shark::QpMcLinear&lt; InputT &gt;</a></td></tr>
<tr class="memitem:a257f16d453818fb33a9b32d8dd7c6bf2 inherit pub_methods_classshark_1_1_qp_mc_linear" id="r_a257f16d453818fb33a9b32d8dd7c6bf2"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_qp_mc_linear.html#a257f16d453818fb33a9b32d8dd7c6bf2">QpMcLinear</a> (const <a class="el" href="classshark_1_1_qp_mc_linear.html#a09a8a598fe1e6c6c625be0c55b03985a">DatasetType</a> &amp;dataset, std::size_t dim, std::size_t classes, std::size_t strategy=<a class="el" href="classshark_1_1_qp_mc_linear.html#a844cac01d9113019e1f89de7d0810d79a306e16139b81caaa99ea79d3ede9a712">ACF</a>, bool shrinking=false)</td></tr>
<tr class="memdesc:a257f16d453818fb33a9b32d8dd7c6bf2 inherit pub_methods_classshark_1_1_qp_mc_linear"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor.  <br /></td></tr>
<tr class="separator:a257f16d453818fb33a9b32d8dd7c6bf2 inherit pub_methods_classshark_1_1_qp_mc_linear"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a468f877984aab4f95122083bf4a87152 inherit pub_methods_classshark_1_1_qp_mc_linear" id="r_a468f877984aab4f95122083bf4a87152"><td class="memItemLeft" align="right" valign="top">RealMatrix&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_qp_mc_linear.html#a468f877984aab4f95122083bf4a87152">solve</a> (random::rng_type &amp;rng, double C, <a class="el" href="structshark_1_1_qp_stopping_condition.html">QpStoppingCondition</a> &amp;stop, <a class="el" href="structshark_1_1_qp_solution_properties.html">QpSolutionProperties</a> *prop=NULL, bool verbose=false)</td></tr>
<tr class="memdesc:a468f877984aab4f95122083bf4a87152 inherit pub_methods_classshark_1_1_qp_mc_linear"><td class="mdescLeft">&#160;</td><td class="mdescRight">Solve the SVM training problem.  <br /></td></tr>
<tr class="separator:a468f877984aab4f95122083bf4a87152 inherit pub_methods_classshark_1_1_qp_mc_linear"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pro-methods" name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:af8021dbbe5f3c4b3e5fdc83b941748cd" id="r_af8021dbbe5f3c4b3e5fdc83b941748cd"><td class="memItemLeft" align="right" valign="top">virtual double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_qp_mc_linear_a_d_m.html#af8021dbbe5f3c4b3e5fdc83b941748cd">calcGradient</a> (RealVector &amp;gradient, RealVector wx, blas::dense_vector_adaptor&lt; double const &gt; const &amp;alpha, double C, unsigned int y)</td></tr>
<tr class="memdesc:af8021dbbe5f3c4b3e5fdc83b941748cd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute the gradient from the inner products of the weight vectors with the current sample.  <br /></td></tr>
<tr class="separator:af8021dbbe5f3c4b3e5fdc83b941748cd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad9c79ecd1418beba9c94b414a8f3b8ef" id="r_ad9c79ecd1418beba9c94b414a8f3b8ef"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_qp_mc_linear_a_d_m.html#ad9c79ecd1418beba9c94b414a8f3b8ef">updateWeightVectors</a> (RealMatrix &amp;w, RealVector const &amp;mu, std::size_t index)</td></tr>
<tr class="memdesc:ad9c79ecd1418beba9c94b414a8f3b8ef"><td class="mdescLeft">&#160;</td><td class="mdescRight">Update the weight vectors (primal variables) after a step on the dual variables.  <br /></td></tr>
<tr class="separator:ad9c79ecd1418beba9c94b414a8f3b8ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a81cde691765509bedeafe49950a4f55f" id="r_a81cde691765509bedeafe49950a4f55f"><td class="memItemLeft" align="right" valign="top">virtual double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_qp_mc_linear_a_d_m.html#a81cde691765509bedeafe49950a4f55f">solveSub</a> (double epsilon, RealVector &amp;gradient, double q, double C, unsigned int y, blas::dense_vector_adaptor&lt; double &gt; &amp;alpha, RealVector &amp;mu)</td></tr>
<tr class="memdesc:a81cde691765509bedeafe49950a4f55f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Solve the sub-problem posed by a single training example.  <br /></td></tr>
<tr class="separator:a81cde691765509bedeafe49950a4f55f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_methods_classshark_1_1_qp_mc_linear"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_classshark_1_1_qp_mc_linear')"><img src="closed.png" alt="-"/>&#160;Protected Member Functions inherited from <a class="el" href="classshark_1_1_qp_mc_linear.html">shark::QpMcLinear&lt; InputT &gt;</a></td></tr>
<tr class="memitem:a64edc8279169777bf9ef05052a412acd inherit pro_methods_classshark_1_1_qp_mc_linear" id="r_a64edc8279169777bf9ef05052a412acd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_qp_mc_linear.html#a64edc8279169777bf9ef05052a412acd">add_scaled</a> (RealMatrix &amp;w, RealVector const &amp;mu, <a class="el" href="classshark_1_1_qp_mc_linear.html#a88e09c2e6decd1e35f0755f0faf982f7">InputReferenceType</a> x)</td></tr>
<tr class="separator:a64edc8279169777bf9ef05052a412acd inherit pro_methods_classshark_1_1_qp_mc_linear"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="inherited" name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pro_attribs_classshark_1_1_qp_mc_linear"><td colspan="2" onclick="javascript:toggleInherit('pro_attribs_classshark_1_1_qp_mc_linear')"><img src="closed.png" alt="-"/>&#160;Protected Attributes inherited from <a class="el" href="classshark_1_1_qp_mc_linear.html">shark::QpMcLinear&lt; InputT &gt;</a></td></tr>
<tr class="memitem:ab724fc27e23748209c439970919afdc1 inherit pro_attribs_classshark_1_1_qp_mc_linear" id="r_ab724fc27e23748209c439970919afdc1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classshark_1_1_data_view.html">DataView</a>&lt; const <a class="el" href="classshark_1_1_qp_mc_linear.html#a09a8a598fe1e6c6c625be0c55b03985a">DatasetType</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_qp_mc_linear.html#ab724fc27e23748209c439970919afdc1">m_data</a></td></tr>
<tr class="memdesc:ab724fc27e23748209c439970919afdc1 inherit pro_attribs_classshark_1_1_qp_mc_linear"><td class="mdescLeft">&#160;</td><td class="mdescRight">view on training data  <br /></td></tr>
<tr class="separator:ab724fc27e23748209c439970919afdc1 inherit pro_attribs_classshark_1_1_qp_mc_linear"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adb2a6e9f3681450a55dd5764648d0cb6 inherit pro_attribs_classshark_1_1_qp_mc_linear" id="r_adb2a6e9f3681450a55dd5764648d0cb6"><td class="memItemLeft" align="right" valign="top">RealVector&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_qp_mc_linear.html#adb2a6e9f3681450a55dd5764648d0cb6">m_xSquared</a></td></tr>
<tr class="memdesc:adb2a6e9f3681450a55dd5764648d0cb6 inherit pro_attribs_classshark_1_1_qp_mc_linear"><td class="mdescLeft">&#160;</td><td class="mdescRight">diagonal entries of the quadratic matrix  <br /></td></tr>
<tr class="separator:adb2a6e9f3681450a55dd5764648d0cb6 inherit pro_attribs_classshark_1_1_qp_mc_linear"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a04cb0e529976e34569d0b6863e36b881 inherit pro_attribs_classshark_1_1_qp_mc_linear" id="r_a04cb0e529976e34569d0b6863e36b881"><td class="memItemLeft" align="right" valign="top">std::size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_qp_mc_linear.html#a04cb0e529976e34569d0b6863e36b881">m_dim</a></td></tr>
<tr class="memdesc:a04cb0e529976e34569d0b6863e36b881 inherit pro_attribs_classshark_1_1_qp_mc_linear"><td class="mdescLeft">&#160;</td><td class="mdescRight">input space dimension  <br /></td></tr>
<tr class="separator:a04cb0e529976e34569d0b6863e36b881 inherit pro_attribs_classshark_1_1_qp_mc_linear"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3deaa3c8d8f3b5a15ffc509ed17a0398 inherit pro_attribs_classshark_1_1_qp_mc_linear" id="r_a3deaa3c8d8f3b5a15ffc509ed17a0398"><td class="memItemLeft" align="right" valign="top">std::size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_qp_mc_linear.html#a3deaa3c8d8f3b5a15ffc509ed17a0398">m_classes</a></td></tr>
<tr class="memdesc:a3deaa3c8d8f3b5a15ffc509ed17a0398 inherit pro_attribs_classshark_1_1_qp_mc_linear"><td class="mdescLeft">&#160;</td><td class="mdescRight">number of classes  <br /></td></tr>
<tr class="separator:a3deaa3c8d8f3b5a15ffc509ed17a0398 inherit pro_attribs_classshark_1_1_qp_mc_linear"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab5489cad6b7a0db6065331414ae21dc7 inherit pro_attribs_classshark_1_1_qp_mc_linear" id="r_ab5489cad6b7a0db6065331414ae21dc7"><td class="memItemLeft" align="right" valign="top">std::size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_qp_mc_linear.html#ab5489cad6b7a0db6065331414ae21dc7">m_strategy</a></td></tr>
<tr class="memdesc:ab5489cad6b7a0db6065331414ae21dc7 inherit pro_attribs_classshark_1_1_qp_mc_linear"><td class="mdescLeft">&#160;</td><td class="mdescRight">strategy for coordinate selection  <br /></td></tr>
<tr class="separator:ab5489cad6b7a0db6065331414ae21dc7 inherit pro_attribs_classshark_1_1_qp_mc_linear"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4881e1ffbdb28a0f2d0fee00373e4e09 inherit pro_attribs_classshark_1_1_qp_mc_linear" id="r_a4881e1ffbdb28a0f2d0fee00373e4e09"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_qp_mc_linear.html#a4881e1ffbdb28a0f2d0fee00373e4e09">m_shrinking</a></td></tr>
<tr class="memdesc:a4881e1ffbdb28a0f2d0fee00373e4e09 inherit pro_attribs_classshark_1_1_qp_mc_linear"><td class="mdescLeft">&#160;</td><td class="mdescRight">apply shrinking or not?  <br /></td></tr>
<tr class="separator:a4881e1ffbdb28a0f2d0fee00373e4e09 inherit pro_attribs_classshark_1_1_qp_mc_linear"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><div class="compoundTemplParams">template&lt;class InputT&gt;<br />
class shark::QpMcLinearADM&lt; InputT &gt;</div><p>Solver for the multi-class SVM with absolute margin and discriminative maximum loss. </p>

<p class="definition">Definition at line <a class="el" href="_qp_mc_linear_8h_source.html#l01009">1009</a> of file <a class="el" href="_qp_mc_linear_8h_source.html">QpMcLinear.h</a>.</p>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a id="a4d8bc5efdd4db624d7c22a167637e53c" name="a4d8bc5efdd4db624d7c22a167637e53c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4d8bc5efdd4db624d7c22a167637e53c">&#9670;&#160;</a></span>DatasetType</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputT &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="classshark_1_1_labeled_data.html">LabeledData</a>&lt;InputT, unsigned int&gt; <a class="el" href="classshark_1_1_qp_mc_linear_a_d_m.html">shark::QpMcLinearADM</a>&lt; InputT &gt;::DatasetType</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_qp_mc_linear_8h_source.html#l01012">1012</a> of file <a class="el" href="_qp_mc_linear_8h_source.html">QpMcLinear.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a6066f28f061d4bef949314816c67a82c" name="a6066f28f061d4bef949314816c67a82c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6066f28f061d4bef949314816c67a82c">&#9670;&#160;</a></span>QpMcLinearADM()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classshark_1_1_qp_mc_linear_a_d_m.html">shark::QpMcLinearADM</a>&lt; InputT &gt;::QpMcLinearADM </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classshark_1_1_qp_mc_linear_a_d_m.html#a4d8bc5efdd4db624d7c22a167637e53c">DatasetType</a> &amp;&#160;</td>
          <td class="paramname"><em>dataset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>dim</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>classes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Constructor. </p>

<p class="definition">Definition at line <a class="el" href="_qp_mc_linear_8h_source.html#l01015">1015</a> of file <a class="el" href="_qp_mc_linear_8h_source.html">QpMcLinear.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="af8021dbbe5f3c4b3e5fdc83b941748cd" name="af8021dbbe5f3c4b3e5fdc83b941748cd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af8021dbbe5f3c4b3e5fdc83b941748cd">&#9670;&#160;</a></span>calcGradient()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual double <a class="el" href="classshark_1_1_qp_mc_linear_a_d_m.html">shark::QpMcLinearADM</a>&lt; InputT &gt;::calcGradient </td>
          <td>(</td>
          <td class="paramtype">RealVector &amp;&#160;</td>
          <td class="paramname"><em>gradient</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">RealVector&#160;</td>
          <td class="paramname"><em>wx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">blas::dense_vector_adaptor&lt; double const &gt; const &amp;&#160;</td>
          <td class="paramname"><em>alpha</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>C</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Compute the gradient from the inner products of the weight vectors with the current sample. </p>

<p>Implements <a class="el" href="classshark_1_1_qp_mc_linear.html#a6ff5650431f4502b6a76e7b79b7ff514">shark::QpMcLinear&lt; InputT &gt;</a>.</p>

<p class="definition">Definition at line <a class="el" href="_qp_mc_linear_8h_source.html#l01024">1024</a> of file <a class="el" href="_qp_mc_linear_8h_source.html">QpMcLinear.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_qp_mc_linear.html#a3deaa3c8d8f3b5a15ffc509ed17a0398">shark::QpMcLinear&lt; InputT &gt;::m_classes</a>.</p>

</div>
</div>
<a id="a81cde691765509bedeafe49950a4f55f" name="a81cde691765509bedeafe49950a4f55f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a81cde691765509bedeafe49950a4f55f">&#9670;&#160;</a></span>solveSub()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual double <a class="el" href="classshark_1_1_qp_mc_linear_a_d_m.html">shark::QpMcLinearADM</a>&lt; InputT &gt;::solveSub </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>epsilon</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">RealVector &amp;&#160;</td>
          <td class="paramname"><em>gradient</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>q</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>C</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">blas::dense_vector_adaptor&lt; double &gt; &amp;&#160;</td>
          <td class="paramname"><em>alpha</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">RealVector &amp;&#160;</td>
          <td class="paramname"><em>mu</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Solve the sub-problem posed by a single training example. </p>

<p>Implements <a class="el" href="classshark_1_1_qp_mc_linear.html#ad1bd9cdcfb10e5aca7c77e16812bae92">shark::QpMcLinear&lt; InputT &gt;</a>.</p>

<p class="definition">Definition at line <a class="el" href="_qp_mc_linear_8h_source.html#l01078">1078</a> of file <a class="el" href="_qp_mc_linear_8h_source.html">QpMcLinear.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_qp_mc_linear.html#a3deaa3c8d8f3b5a15ffc509ed17a0398">shark::QpMcLinear&lt; InputT &gt;::m_classes</a>.</p>

</div>
</div>
<a id="ad9c79ecd1418beba9c94b414a8f3b8ef" name="ad9c79ecd1418beba9c94b414a8f3b8ef"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad9c79ecd1418beba9c94b414a8f3b8ef">&#9670;&#160;</a></span>updateWeightVectors()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="classshark_1_1_qp_mc_linear_a_d_m.html">shark::QpMcLinearADM</a>&lt; InputT &gt;::updateWeightVectors </td>
          <td>(</td>
          <td class="paramtype">RealMatrix &amp;&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">RealVector const &amp;&#160;</td>
          <td class="paramname"><em>mu</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>index</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Update the weight vectors (primal variables) after a step on the dual variables. </p>

<p>Implements <a class="el" href="classshark_1_1_qp_mc_linear.html#addbaf611cbd58e4a4e3d07b80a95fbf4">shark::QpMcLinear&lt; InputT &gt;</a>.</p>

<p class="definition">Definition at line <a class="el" href="_qp_mc_linear_8h_source.html#l01067">1067</a> of file <a class="el" href="_qp_mc_linear_8h_source.html">QpMcLinear.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_qp_mc_linear.html#a64edc8279169777bf9ef05052a412acd">shark::QpMcLinear&lt; InputT &gt;::add_scaled()</a>, <a class="el" href="classshark_1_1_qp_mc_linear.html#a3deaa3c8d8f3b5a15ffc509ed17a0398">shark::QpMcLinear&lt; InputT &gt;::m_classes</a>, and <a class="el" href="classshark_1_1_qp_mc_linear.html#ab724fc27e23748209c439970919afdc1">shark::QpMcLinear&lt; InputT &gt;::m_data</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>include/shark/Algorithms/QP/<a class="el" href="_qp_mc_linear_8h_source.html">QpMcLinear.h</a></li>
</ul>
</div><!-- contents -->
</div>
</body>
</html>
